﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Graphene.Processing
{
    public delegate void ResultChangedHandler(object sender, Object whatChanged);

    public interface ProcessorSource
    {
        /**
         * Resets the nSourceChanges to 0. Used for measuring the source changes per seconds.
         */
        void ResetNResultChanges();

        /**
         * Whenever the source changes, the methods (delegates) added by this method will
         * be called.
         */
        void AddResultChangedHandler(Graphene.Processing.ResultChangedHandler handler);

        void RemoveResultChangedHandler(Graphene.Processing.ResultChangedHandler handler);


        /* Properties: */

        /**
         * The source for the Processor.
         * This can be, for example, a bitmap image that needs to be processed by an ImageProcessor.
         * However the name is 'source', this is the main output of the class(/interface).
         */
        Object ResultData
        {
            get;
        }

        /**
         * Number of changes in the source. Of course this number will be reset to 0 time by time.
         * ...usually in every second so we can measure the number of source changes per second.
         * Anyways, it's the number of changes since last reset.
         */
        int NResultChanges
        {
            get;
        }
    }
}